package com.dycx.api.controller.app.user;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dycx.common.RestResponse;
import com.dycx.common.annotation.Authorization;
import com.dycx.common.context.UserInfoContext;
import com.dycx.user.dto.WalletLogDTO;
import com.dycx.user.service.WalletLogService;
import com.dycx.user.vo.WalletLogVO;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.validation.Valid;


/**
 * 资金明细(WalletLog)表控制层
 *
 * @author makejava
 * @since 2024-08-10 16:05:13
 */
@RestController
@RequestMapping(value = "/app/user/WalletLog")
public class WalletLogController {
    /**
     * 服务对象
     */
    @Resource
    private WalletLogService walletLogService;

    /**
     * 分页
     *
     * @author wzb
     **/
    @Authorization
    @PostMapping("getPage")
    public RestResponse<Page<WalletLogVO>> getPage(@RequestBody WalletLogDTO dto) {
        dto.setUid(UserInfoContext.get().getUserId());
        return RestResponse.success(walletLogService.getPage(dto));
    }

}

